<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>kspaceLineRecon :: Functions (k-Wave)</title>
	<link rel="stylesheet" href="kwavehelpstyle.css" type="text/css">
</head>

<body>
<div class="content">

<h1>kspaceLineRecon</h1>
<p class="purpose">2D linear FFT reconstruction.</p>

<h2>Syntax</h2>

<pre class="codeinput">
p_xy = kspaceLineRecon(p_ty, dy, dt, c)
p_xy = kspaceLineRecon(p_ty, dy, dt, c, ...)
</pre>

<h2>Description</h2>
<p><code>kspaceLineRecon</code> takes an acoustic pressure time-series <code>p_ty</code> recorded over an evenly spaced array of sensor points on a line, and constructs an estimate of the initial acoustic pressure distribution that gave rise to those measurements using an algorithm based on the FFT. The input <code>p_ty</code> must be indexed <code>p_ty(<em>time step</em>, <em>sensor y position</em>)</code>, where the sensor spacing is given by <code>dy</code>, the temporal spacing given by <code>dt</code>, and the sound speed in the propagation medium (which is assumed to be acoustically homogeneous) is given by <code>c</code>. The output <code>p_xy</code> is indexed as <code>p_xy(<em>x position</em>, <em>y position</em>)</code>.</p>

<p>The code uses a k-space algorithm which performs (1) a Fourier transform on the data <code>p_ty</code> along both <code>t</code> and <code>y</code> dimensions (into wavenumber-frequency space, where the wavenumber component is along the detector line), (2) a mapping, based on the dispersion relation for a plane wave in an acoustically homogeneous medium, from wavenumber-frequency space to wavenumber-wavenumber space (where the second component is orthogonal to the detector line), and finally (3) an inverse Fourier transform back from the wavenumber domain to the spatial domain. The result is an estimate of the initial acoustic pressure distribution from which the acoustic waves originated.</p>

<p>Steps (1) and (3) can be performed efficiently using the fast Fourier transform (FFT); they are therefore fastest when the number of samples and number of detector points are both powers of 2. The mapping in step (2) requires an interpolation of the data from an evenly spaced grid of points in the wavenumber-frequency domain to an evenly-spaced grid of points in the wavenumber-wavenumber domain. The option <code>'Interp'</code> may be used to choose the interpolation method.</p>

<p>The physics of photoacoustics requires that the acoustic pressure is initially non-negative everywhere. The estimate of the initial pressure distribution generated by this code may have negative regions due to artefacts arising from differences between the assumed model and the real situation, e.g., homogeneous medium vs. real, somewhat heterogeneous, medium; infinite measurement surface vs. finite-sized region-of-detection, etc. A positivity (or non-negativity) condition can be enforced by setting the optional <code>'PosCond'</code> to <code>true</code> which simply sets any negative parts of the final image to zero.</p>

<h2>Inputs</h2>

<table class="body">
    <tr valign="top">
        <td width = "150"><code>p_tx</code></td>
        <td>
            <p>pressure time-series recorded over an evenly spaced array of sensor points on a line (indexed as t, y)</p>
        </td>
    </tr>     
    
    <tr valign="top">
        <td><code>dy</code></td>
        <td>spatial step [m]</td>
    </tr>

    <tr valign="top">
        <td><code>dt</code></td>
        <td>time step [s]</td>
    </tr>    

    <tr valign="top">
        <td><code>c</code></td>
        <td>acoustically-homogeneous sound speed [m/s]</td>
    </tr>  
    
</table>

<h2>Optional Inputs</h2>

<p>Optional 'string', value pairs that may be used to modify the default computational settings.</p>

<table cellspacing="0" class="body" cellpadding="4" border="2">
    <colgroup>
        <col width="18%"><col width="18%"><col width="18%"><col width="46%">
    </colgroup>
    
    <thead>
        <tr valign="top">
            <th bgcolor="#B2B2B2">Input</th>
            <th bgcolor="#B2B2B2">Valid Settings</th>
            <th bgcolor="#B2B2B2">Default</th>
            <th bgcolor="#B2B2B2">Description</th>
        </tr>
    </thead>
    
    <tbody>
        <tr valign="top">
            <td bgcolor="#F2F2F2"><code>'DataOrder'</code></td>
            <td bgcolor="#F2F2F2"><code>'ty'</code><br/><code>'yt'</code></td>
            <td bgcolor="#F2F2F2"><code>'ty'</code></td>            
            <td bgcolor="#F2F2F2">String input which sets the order of the input data.</td>
        </tr>

        <tr valign="top">
            <td bgcolor="#F2F2F2"><code>'Interp'</code></td>
            <td bgcolor="#F2F2F2"><em>(string of interpolation type)</em></td>
            <td bgcolor="#F2F2F2"><code>'*nearest'</code></td>            
            <td bgcolor="#F2F2F2">String input controlling the interpolation method used by <code><a href="matlab: doc interp2">interp2</a></code> in the reconstruction.</td>
        </tr>

        <tr valign="top">
            <td bgcolor="#F2F2F2"><code>'Plot'</code></td>
            <td bgcolor="#F2F2F2"><em>(Boolean scalar)</em></td>
            <td bgcolor="#F2F2F2"><code>false</code></td>            
            <td bgcolor="#F2F2F2">Boolean controlling whether a plot of the reconstructed estimate of the initial acoustic pressure distribution
            is produced.</td>
        </tr>        
        
        <tr valign="top">
            <td bgcolor="#F2F2F2"><code>'PosCond'</code></td>
            <td bgcolor="#F2F2F2"><em>(Boolean scalar)</em></td>
            <td bgcolor="#F2F2F2"><code>false</code></td>            
            <td bgcolor="#F2F2F2">Boolean controlling whether a positivity condition is enforced on the reconstructed estimate of the initial acoustic pressure distribution.</td>
        </tr>          
        
    </tbody>
</table>

<h2>Outputs</h2>

<table class="body">
    <tr valign="top">
        <td width = "150"><code>p_xy</code></td>
        <td>estimate of the initial acoustic pressure distribution (indexed as x, y)</td>
    </tr>
</table>

<h2>Examples</h2>
<ul>
<li><a href="example_pr_2D_fft_line_sensor.html">2D FFT Reconstruction For A Line Sensor</a></li> 
<li><a href="example_pr_2D_tr_line_sensor.html">2D Time Reversal For A Line Sensor</a></li>
</ul>
<h2>See Also</h2>

<code><a href="matlab: doc interp2">interp2</a></code>, <code><a href="kspacePlaneRecon.html">kspacePlaneRecon</a></code>, <code><a href="kWaveGrid.html">kWaveGrid</a></code>

</div></body></html>